<?php echo $__env->make('admin::layouts.header', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class="admin-main layui-anim layui-anim-upbit">
	<fieldset class="layui-elem-field layui-field-title">
		<legend><?php echo e($info['name']); ?></legend>
	</fieldset>
	<form class="layui-form layui-form-pane" lay-filter="form">
		<?php if($info['keys'] == 'phone'): ?>
			<div class="layui-form-item">
				<label class="layui-form-label">手机号</label>
				<div class="layui-input-2">
					<input type="text"  name="phone" value="" placeholder="请输入手机号" lay-verify="required" class="layui-input">
				</div>
			</div>
		<?php endif; ?>
		<?php if($info['keys'] == 'ip'): ?>
			<div class="layui-form-item">
				<label class="layui-form-label">IP</label>
				<div class="layui-input-2">
					<input type="text"  name="ip" value="" placeholder="请输入IP" lay-verify="required" class="layui-input">
				</div>
			</div>
		<?php endif; ?>
		<?php if($info['keys'] == 'idcard'): ?>
			<div class="layui-form-item">
				<label class="layui-form-label">身份证号</label>
				<div class="layui-input-2">
					<input type="text"  name="cardno" value="" placeholder="请输入身份证号" lay-verify="required" class="layui-input">
				</div>
			</div>
		<?php endif; ?>
		<?php if($info['keys'] == 'qq'): ?>
			<div class="layui-form-item">
				<label class="layui-form-label">QQ号</label>
				<div class="layui-input-2">
					<input type="text"  name="qq" value="" placeholder="请输入QQ号" lay-verify="required" class="layui-input">
				</div>
			</div>
		<?php endif; ?>
		<div class="site-demo-laytpl" style="text-align:left" id="data">
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button type="button" class="layui-btn" lay-submit="" lay-filter="submit"><?php echo config('admin.submit'); ?></button> 
			</div>
		</div>
	</form>
</div>
<?php echo $__env->make('admin::layouts.footer', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<script>
	layui.use(['form','layer'], function () {
        var form = layui.form,layer = layui.layer,$= layui.jquery;
        //提交监听
        form.on('submit(submit)', function (data) {
            loading =layer.load(1, {shade: [0.1,'#fff']});
            $.post("<?php echo e($info['url']); ?>",data.field,function(res){ 
				layer.close(loading);
                if(res.status == 1){
					var vals = '{' + ' \n ';
					for (var prop in res.msg) {
					  vals += prop + ":" + res.msg[prop] + ' \n ';
					}
					vals += '}';
                    $('#data').html('<div><span>返回数据</span></div><textarea class="site-demo-text">'+vals+'</textarea>');
                }else{
                    layer.msg(res.error,{icon: 2, time: 1000});
                }
            });
        })
    })
 </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 